import 'package:flutter/material.dart';

import '../fonts/riki_font.dart';
import '../uikit.dart';
import 'font_weight_extension.dart';

/// TextStyle文本样式的扩展
extension TextStyleExt on TextStyle {
  /// 颜色拓展
  /// 对应->RikiTheme.current.shade900
  TextStyle get shade900 => copyWith(color: RikiTheme.current.shade900);

  /// 对应->RikiTheme.current.shade800
  TextStyle get shade800 => copyWith(color: RikiTheme.current.shade800);

  /// 对应->RikiTheme.current.shade700
  TextStyle get shade700 => copyWith(color: RikiTheme.current.shade700);

  /// 对应->RikiTheme.current.shade600
  TextStyle get shade600 => copyWith(color: RikiTheme.current.shade600);

  /// 对应->RikiTheme.current.shade500
  TextStyle get shade500 => copyWith(color: RikiTheme.current.shade500);

  /// 对应->RikiTheme.current.shade400
  TextStyle get shade400 => copyWith(color: RikiTheme.current.shade400);

  /// 对应->RikiTheme.current.shade300
  TextStyle get shade300 => copyWith(color: RikiTheme.current.shade300);

  /// 对应->RikiTheme.current.shade200
  TextStyle get shade200 => copyWith(color: RikiTheme.current.shade200);

  /// 对应->RikiTheme.current.shade100
  TextStyle get shade100 => copyWith(color: RikiTheme.current.shade100);

  /// 对应->RikiTheme.current.shade50
  TextStyle get shade50 => copyWith(color: RikiTheme.current.shade50);

  /// 对应->主题色(RikiTheme.current.primary)
  TextStyle get primary => copyWith(color: RikiTheme.current.primary);

  /// 对应->警告色(RikiTheme.current.warning)
  TextStyle get warning => copyWith(color: RikiTheme.current.warning);

  /// 对应->失败色(RikiTheme.current.danger)
  TextStyle get danger => copyWith(color: RikiTheme.current.danger);

  /// 对应->成功色(RikiTheme.current.success)
  TextStyle get success => copyWith(color: RikiTheme.current.success);

  /// 对应->白色(RikiTheme.current.white)
  TextStyle get white => copyWith(color: RikiTheme.current.white);

  /// 对应->黑色(RikiTheme.current.success)
  TextStyle get black => copyWith(color: RikiTheme.current.black);

  /// 对应->红色
  TextStyle get price => copyWith(color: RikiTheme.current.price);

  /// weight拓展
  TextStyle get light => copyWith(fontWeight: FontWeightExt.light);

  TextStyle get regular => copyWith(fontWeight: FontWeightExt.regular);

  TextStyle get medium => copyWith(fontWeight: FontWeightExt.medium);

  TextStyle get semibold => copyWith(fontWeight: FontWeightExt.semibold);

  TextStyle get bold => copyWith(fontWeight: FontWeightExt.bold);

  /// 居中
  TextStyle get center => copyWith(
        leadingDistribution: TextLeadingDistribution.even,
        height: 1,
      );

  /// 使用打扮家数字字体
  TextStyle get dbj => copyWith(fontFamily: 'packages/${RikiUikit.PACKAGE}/${RikiFont.DBJ}');

  /// 使用打扮家艺术字体
  TextStyle get dbjArt => copyWith(fontFamily: 'packages/${RikiUikit.PACKAGE}/${RikiFont.DBJArt}');

  /// 使用苹方SC字体
  TextStyle get pf => copyWith(fontFamily: RikiFont.PingFangSC);
}
